International aid may take the form of multilateral aid – provided through international bodies such as the UN, or NGOs such as Oxfam – or bilateral aid, which operates on a government-to-government basis. There is considerable debate about whether international aid works, in the sense of reducing poverty and stimulating development.
However, the effectiveness of aid is often diluted by corruption. Aid is invariably channeled through the governments of recipient countries, in which power is often concentrated in the hands of a few politicians and bureaucrats, and the mechanisms of accountability are, at best, poorly developed. This tends to benefit corrupt leaders and elites rather than the people, projects and programs for which it was intended.
The hypothesis that foreign aid can promote growth in developing countries was explored, using panel data series for foreign aid, while accounting for regional differences in Asian, African, Latin American, and the Caribbean countries as well as the differences in income levels, the results of this study also indicate that foreign aid has mixed effects on economic growth in developing countries.
This study examines the relationships between foreign aid, institutional structure, and economic performance for 80 countries in Europe, America, Africa, and Asia. It is found that official development assistance and the quality of institutional structure in the sample countries affect economic growth positively.
Algunas librerias y paquetes usados para obtener y descargar los datos
library(tidyverse) # manejo de dataframes
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.5 ✓ purrr 0.3.4
## ✓ tibble 3.1.2 ✓ dplyr 1.0.7
## ✓ tidyr 1.1.3 ✓ stringr 1.4.0
## ✓ readr 2.0.1 ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(WDI) # libreria para acceder a metadata de banco mundial
library(readxl) # leer archivos de excel
library(readr) # leer archivos csv
library(visdat) # visualizacion de datos como graficos
library(plotly) # graficos
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(purrr) # funcion map
library(plm) # modelos lineales para datos panel
##
## Attaching package: 'plm'
## The following objects are masked from 'package:dplyr':
##
## between, lag, lead
library(car) # test y utilidaddes para modelos
## Loading required package: carData
##
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
##
## recode
## The following object is masked from 'package:purrr':
##
## some
Datos para paises bajos ingresos sean utilizados, segun clasificación del banco mundial, hay 26 paises de bajos ingresos y 51 de ingresos medios bajos
country_class <- read_excel("CLASS.xlsx")
country_class %>%
filter(!is.na(Region), !is.na(`Income group`)) %>%
group_by(`Income group`) %>%
summarise(countries = n()) %>%
arrange(factor(`Income group`, levels = c('High income', 'Upper middle income', 'Lower middle income', 'Low income')))
Listado de paises a analisar:
my_countries <- country_class %>%
filter(!is.na(Region), `Income group` %in% c('Low income', 'Lower middle income')) %>%
select(Code)
my_countries
Hacer la respectiva asociacion de nombres iso3c e iso2c
my_countries$iso2c <- WDI_data$country %>%
filter(iso3c %in% my_countries$Code) %>%
.$iso2c
my_countries
Datos del banco mundial (para ODA y los indices de gobernanza) y el Human Development Reports API son descargados desde scripts de Python. Son almacenados en archivos CSV y luego son cargados aqui:
datos_HDI <- read_csv("datos_python_HDI.csv", col_names = c('Code', 'iso2c', 'indicator', 'year', 'value'),
col_types = list(col_character(), col_character(), col_character(), col_double(), col_double()))
hdi_indicators <- datos_HDI %>% distinct(indicator) %>% .$indicator
oda_indicators <- c(
'DT_ODA_ALLD_CD',
'DT_ODA_ALLD_KD',
'DT_ODA_OATL_CD',
'DT_ODA_OATL_KD',
'DT_ODA_ODAT_CD',
'DT_ODA_ODAT_GI_ZS',
'DT_ODA_ODAT_GN_ZS',
'DT_ODA_ODAT_KD',
'DT_ODA_ODAT_MP_ZS',
'DT_ODA_ODAT_PC_ZS',
'DT_ODA_ODAT_XP_ZS'
)
gob_indicators <- c(
'CC_EST',
'CC_NO_SRC',
'CC_PER_RNK',
'CC_PER_RNK_LOWER',
'CC_PER_RNK_UPPER',
'CC_STD_ERR',
'GE_EST',
'GE_NO_SRC',
'GE_PER_RNK',
'GE_PER_RNK_LOWER',
'GE_PER_RNK_UPPER',
'GE_STD_ERR',
'PV_EST',
'PV_NO_SRC',
'PV_PER_RNK',
'PV_PER_RNK_LOWER',
'PV_PER_RNK_UPPER',
'PV_STD_ERR',
'RQ_EST',
'RQ_NO_SRC',
'RQ_PER_RNK',
'RQ_PER_RNK_LOWER',
'RQ_PER_RNK_UPPER',
'RQ_STD_ERR',
'RL_EST',
'RL_NO_SRC',
'RL_PER_RNK',
'RL_PER_RNK_LOWER',
'RL_PER_RNK_UPPER',
'RL_STD_ERR',
'VA_EST',
'VA_NO_SRC',
'VA_PER_RNK',
'VA_PER_RNK_LOWER',
'VA_PER_RNK_UPPER',
'VA_STD_ERR'
)
gdp_indicators <- c(
'NY_ADJ_NNTY_PC_CD',
'NY_ADJ_NNTY_PC_KD',
'NY_ADJ_NNTY_PC_KD_ZG',
'NY_GDP_PCAP_CN',
'NY_GDP_PCAP_KN',
'NY_GDP_PCAP_CD',
'NY_GDP_PCAP_KD',
'NY_GDP_MKTP_KD_ZG',
'NY_GDP_DEFL_ZS_AD',
'NY_GDP_DEFL_ZS',
'NY_GDP_MKTP_CD',
'NY_GDP_MKTP_CN',
'NY_GDP_MKTP_KN',
'NY_GDP_MKTP_KD',
'NY_GDP_PCAP_KD_ZG',
'NY_GDP_PCAP_PP_KD',
'NY_GDP_PCAP_PP_CD',
'SL_GDP_PCAP_EM_KD',
'SP_POP_GROW'
)
datos_WB <- data.frame(indicator = character(), iso2c = character(), year = double(), value = double())
suppressWarnings(
for (indicator in c(oda_indicators, gob_indicators, gdp_indicators)) {
datos_WB <- rbind(datos_WB, read_csv(paste("datos_python", indicator, ".csv", sep =''),
col_names = c('indicator', 'iso2c', 'year', 'value'),
col_types = list(col_character(), col_character(), col_double(), col_double())))
}
)
Transformar la estructura de los datos para una mejor comprension
datos_paper <- rbind(datos_WB, datos_HDI %>% select(indicator, iso2c, year, value)) %>%
pivot_wider(names_from = indicator, values_from = value)
Revisar que datos estan como faltantes
vis_dat(datos_paper %>% select(all_of(gsub("_", ".", oda_indicators))))
# DT.ODA.OATL.CD and DT.ODA.OATL.KD faltan
# DT.ODA.ODAT.GI.ZS, DT.ODA.ODAT.GN.ZS, DT.ODA.ODAT.MP.ZS and DT.ODA.ODAT.XP.ZS tienen faltas
# Un par de ocurrencias pais-año que faltan datos
vis_dat(datos_paper %>% select(NY.GDP.PCAP.CN, NY.GDP.PCAP.CD))
# NY.GDP.PCAP.CN, NY.GDP.PCAP.CD, NY.GDP.MKTP.CD, NY.GDP.MKTP.CN son buenos candidatos para usar como variables,
# 'SY'falta PIB per Capita en 2022, 2023 sin datos algunos paises
vis_dat(datos_paper %>% arrange(year) %>% select(all_of(gsub("_", ".", gob_indicators))))
# Datos del 2000 para atras tienen espacios faltantes
vis_dat(datos_paper %>% select(all_of(hdi_indicators)))
# abr, co2_prod, le, le_f, le_m, mmr son las pocas categorias sin datos faltantes
# hdi faltante en multiples ocaciones
vis_dat(datos_paper %>% arrange(iso2c) %>% select(SP.POP.GROW))
# ZW no tiene datos de crecimiento poblacional
Tomando en cuenta los datos faltantes, hacer filtros para seleccionar una muestra mas pequeña
vis_dat(datos_paper %>%
filter(!iso2c %in% c('SS', 'ZW', 'BT', 'ER', 'GW', 'KP', 'LB', 'NG', 'PS', 'SO', 'VU', 'FM', 'KI', 'TL', 'CV', 'SB','SY'),
!year %in% c(1995, 1996, 1997, 1998, 1999, 2000, 2023)) %>%
select(iso2c, year, hdi, DT.ODA.ALLD.CD, DT.ODA.ALLD.KD, DT.ODA.ODAT.CD, DT.ODA.ODAT.KD, DT.ODA.ODAT.PC.ZS,
NY.GDP.PCAP.CN, NY.GDP.PCAP.CD, SP.POP.GROW, all_of(gsub("_", ".", gob_indicators)),
))
##
vis_dat(datos_paper %>%
filter(!iso2c %in% c('SS', 'ZW', 'BT', 'ER', 'GW', 'KP', 'LB', 'NG', 'PS', 'SO', 'VU', 'FM', 'KI', 'TL', 'CV', 'SB','SY'),
!year %in% c(1995, 1996, 1997, 1998, 1999, 2000, 2001, 2023)) %>%
select(iso2c, year, hdi, DT.ODA.ALLD.CD, DT.ODA.ALLD.KD, DT.ODA.ODAT.CD, DT.ODA.ODAT.KD, DT.ODA.ODAT.PC.ZS,
NY.GDP.PCAP.CN, NY.GDP.PCAP.CD, SP.POP.GROW, all_of(gsub("_", ".", gob_indicators)),
))
##
De 2232 observaciones reducimos a 1260 (2002 hasta 2022) o a 1320 (2001 hasta 2022)
Aplicar Operador diferencia
datos_model <- datos_paper %>%
filter(!iso2c %in% c('SS', 'ZW', 'BT', 'ER', 'GW', 'KP', 'LB', 'NG', 'PS', 'SO', 'VU', 'FM', 'KI', 'TL', 'CV', 'SB', 'SY'),
!year %in% c(1995, 1996, 1997, 1998, 1999, 2000, 2023)) %>%
select(iso2c, year, hdi, DT.ODA.ALLD.CD, DT.ODA.ALLD.KD, DT.ODA.ODAT.CD, DT.ODA.ODAT.KD, DT.ODA.ODAT.PC.ZS,
NY.GDP.PCAP.CN, NY.GDP.PCAP.CD, SP.POP.GROW, all_of(gsub("_", ".", gob_indicators))
)
datos_model <- datos_model %>% arrange(iso2c, year) %>%
mutate(hdi_diff = hdi - dplyr::lag(hdi),
NY.GDP.PCAP.CD_diff = NY.GDP.PCAP.CD - dplyr::lag(NY.GDP.PCAP.CD),
DT.ODA.ALLD.CD_diff = DT.ODA.ALLD.CD - dplyr::lag(DT.ODA.ALLD.CD),
DT.ODA.ODAT.PC.ZS_diff = DT.ODA.ODAT.PC.ZS - dplyr::lag(DT.ODA.ODAT.PC.ZS)) %>%
filter(!year %in% c(2001))
vis_dat(datos_model)
Probando modelos sencillos, regresion lineal, Minimos cuadrados, datos panel, HDI o GDP o sus differecias
vd <- c('hdi', 'hdi_diff', 'NY.GDP.PCAP.CD', 'NY.GDP.PCAP.CD_diff')
vi <- c('DT.ODA.ALLD.CD', 'DT.ODA.ALLD.CD_diff', 'DT.ODA.ODAT.PC.ZS', 'DT.ODA.ODAT.PC.ZS_diff')
models <- list()
keys <- character()
for (vd_ in vd) {
for (vi_ in vi) {
key <- paste(vd_, vi_, sep = "~")
keys <- c(keys, key)
f <- paste(vd_, '~', vi_, '+ CC.EST + GE.EST + PV.EST + RQ.EST + RL.EST + VA.EST + SP.POP.GROW')
models[[key]] <- lm(f, data=datos_model)
}
}
HDI = ODA.ALL + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[1]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.24376 -0.05200 -0.00272 0.05310 0.48585
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.624e-01 6.715e-03 98.642 < 2e-16 ***
## DT.ODA.ALLD.CD 6.180e-12 2.369e-12 2.609 0.009195 **
## CC.EST -7.398e-02 9.048e-03 -8.176 7.13e-16 ***
## GE.EST 1.115e-01 9.458e-03 11.790 < 2e-16 ***
## PV.EST 1.501e-02 3.885e-03 3.864 0.000117 ***
## RQ.EST -6.752e-04 9.569e-03 -0.071 0.943761
## RL.EST 2.889e-02 1.046e-02 2.762 0.005834 **
## VA.EST -1.363e-02 4.712e-03 -2.892 0.003895 **
## SP.POP.GROW -3.803e-02 2.400e-03 -15.849 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08028 on 1251 degrees of freedom
## Multiple R-squared: 0.427, Adjusted R-squared: 0.4234
## F-statistic: 116.6 on 8 and 1251 DF, p-value: < 2.2e-16
# Todas las variables son significativas al 99% excepto Regulatory Quality
HDI = ODA.ALL_diff + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[2]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.24845 -0.05075 -0.00158 0.05413 0.48633
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.662e-01 6.572e-03 101.356 < 2e-16 ***
## DT.ODA.ALLD.CD_diff -7.009e-13 4.398e-12 -0.159 0.87340
## CC.EST -7.550e-02 9.055e-03 -8.338 < 2e-16 ***
## GE.EST 1.140e-01 9.435e-03 12.084 < 2e-16 ***
## PV.EST 1.085e-02 3.553e-03 3.052 0.00232 **
## RQ.EST -2.854e-03 9.559e-03 -0.299 0.76533
## RL.EST 3.309e-02 1.036e-02 3.193 0.00144 **
## VA.EST -1.389e-02 4.724e-03 -2.940 0.00335 **
## SP.POP.GROW -3.727e-02 2.390e-03 -15.592 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08049 on 1251 degrees of freedom
## Multiple R-squared: 0.4239, Adjusted R-squared: 0.4203
## F-statistic: 115.1 on 8 and 1251 DF, p-value: < 2.2e-16
# Todas las variables son significativas al 99% excepto ODA.ALL_diff y Regulatory Quality
HDI = ODA.PC + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[3]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.23281 -0.05385 -0.00335 0.05343 0.43779
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.449e-01 7.101e-03 90.823 < 2e-16 ***
## DT.ODA.ODAT.PC.ZS 2.411e-04 3.386e-05 7.120 1.81e-12 ***
## CC.EST -9.071e-02 9.130e-03 -9.935 < 2e-16 ***
## GE.EST 1.205e-01 9.294e-03 12.968 < 2e-16 ***
## PV.EST 6.662e-03 3.532e-03 1.886 0.059520 .
## RQ.EST 8.239e-03 9.499e-03 0.867 0.385940
## RL.EST 2.907e-02 1.017e-02 2.857 0.004342 **
## VA.EST -1.744e-02 4.658e-03 -3.745 0.000189 ***
## SP.POP.GROW -3.805e-02 2.344e-03 -16.231 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07891 on 1251 degrees of freedom
## Multiple R-squared: 0.4464, Adjusted R-squared: 0.4428
## F-statistic: 126.1 on 8 and 1251 DF, p-value: < 2.2e-16
# Todas las variables son significativas al 99% excepto Regulatory Quality
HDI = ODA.PC_diff + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[4]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.24848 -0.05065 -0.00138 0.05400 0.48815
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.662e-01 6.572e-03 101.368 < 2e-16 ***
## DT.ODA.ODAT.PC.ZS_diff -2.093e-05 6.095e-05 -0.343 0.73132
## CC.EST -7.548e-02 9.054e-03 -8.336 < 2e-16 ***
## GE.EST 1.140e-01 9.435e-03 12.087 < 2e-16 ***
## PV.EST 1.086e-02 3.553e-03 3.057 0.00228 **
## RQ.EST -2.921e-03 9.561e-03 -0.306 0.76002
## RL.EST 3.310e-02 1.036e-02 3.195 0.00144 **
## VA.EST -1.388e-02 4.724e-03 -2.939 0.00335 **
## SP.POP.GROW -3.727e-02 2.389e-03 -15.602 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08049 on 1251 degrees of freedom
## Multiple R-squared: 0.424, Adjusted R-squared: 0.4203
## F-statistic: 115.1 on 8 and 1251 DF, p-value: < 2.2e-16
# Todas las variables son significativas al 99% excepto ODA.ALL_diff y Regulatory Quality
HDI_diff = ODA.ALL + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[5]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.080004 -0.002651 0.000202 0.003104 0.076669
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.494e-03 5.325e-04 8.440 < 2e-16 ***
## DT.ODA.ALLD.CD -2.771e-13 1.879e-13 -1.475 0.140439
## CC.EST 3.422e-04 7.175e-04 0.477 0.633473
## GE.EST 2.536e-03 7.500e-04 3.381 0.000743 ***
## PV.EST 5.528e-04 3.081e-04 1.794 0.073001 .
## RQ.EST -1.583e-03 7.588e-04 -2.087 0.037131 *
## RL.EST -1.253e-03 8.294e-04 -1.511 0.131150
## VA.EST -6.272e-04 3.737e-04 -1.679 0.093494 .
## SP.POP.GROW 5.310e-04 1.903e-04 2.790 0.005346 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.006366 on 1251 degrees of freedom
## Multiple R-squared: 0.0217, Adjusted R-squared: 0.01544
## F-statistic: 3.468 on 8 and 1251 DF, p-value: 0.0005781
# Todas las variables son significativas al 99% excepto Regulatory Quality
HDI_diff = ODA.ALL_diff + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[6]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.078981 -0.002760 0.000244 0.003127 0.075141
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.310e-03 5.189e-04 8.306 2.55e-16 ***
## DT.ODA.ALLD.CD_diff -8.823e-13 3.472e-13 -2.541 0.01117 *
## CC.EST 3.941e-04 7.149e-04 0.551 0.58153
## GE.EST 2.451e-03 7.449e-04 3.290 0.00103 **
## PV.EST 7.262e-04 2.805e-04 2.588 0.00975 **
## RQ.EST -1.493e-03 7.547e-04 -1.978 0.04811 *
## RL.EST -1.458e-03 8.181e-04 -1.782 0.07503 .
## VA.EST -6.130e-04 3.730e-04 -1.644 0.10051
## SP.POP.GROW 5.143e-04 1.887e-04 2.725 0.00652 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.006355 on 1251 degrees of freedom
## Multiple R-squared: 0.02503, Adjusted R-squared: 0.01879
## F-statistic: 4.014 on 8 and 1251 DF, p-value: 0.0001019
# Todas las variables son significativas al 99% excepto ODA.ALL_diff y Regulatory Quality
HDI_diff = ODA.PC + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[7]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.077395 -0.002747 0.000271 0.002883 0.077715
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.555e-03 5.673e-04 9.791 < 2e-16 ***
## DT.ODA.ODAT.PC.ZS -1.397e-05 2.706e-06 -5.164 2.81e-07 ***
## CC.EST 1.292e-03 7.294e-04 1.771 0.076745 .
## GE.EST 2.046e-03 7.426e-04 2.755 0.005951 **
## PV.EST 9.821e-04 2.822e-04 3.480 0.000519 ***
## RQ.EST -2.128e-03 7.589e-04 -2.804 0.005119 **
## RL.EST -1.208e-03 8.128e-04 -1.487 0.137350
## VA.EST -4.095e-04 3.721e-04 -1.100 0.271361
## SP.POP.GROW 5.420e-04 1.873e-04 2.894 0.003876 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.006305 on 1251 degrees of freedom
## Multiple R-squared: 0.04045, Adjusted R-squared: 0.03431
## F-statistic: 6.592 on 8 and 1251 DF, p-value: 1.859e-08
# Todas las variables son significativas al 99% excepto Regulatory Quality
HDI_diff = ODA.PC_diff + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[8]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.077186 -0.002656 0.000267 0.003112 0.073850
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.328e-03 5.174e-04 8.365 < 2e-16 ***
## DT.ODA.ODAT.PC.ZS_diff -1.778e-05 4.798e-06 -3.706 0.000220 ***
## CC.EST 4.205e-04 7.128e-04 0.590 0.555328
## GE.EST 2.457e-03 7.428e-04 3.307 0.000969 ***
## PV.EST 7.431e-04 2.797e-04 2.657 0.007984 **
## RQ.EST -1.548e-03 7.527e-04 -2.056 0.039957 *
## RL.EST -1.441e-03 8.157e-04 -1.767 0.077547 .
## VA.EST -6.107e-04 3.719e-04 -1.642 0.100823
## SP.POP.GROW 5.068e-04 1.881e-04 2.695 0.007140 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.006337 on 1251 degrees of freedom
## Multiple R-squared: 0.03063, Adjusted R-squared: 0.02443
## F-statistic: 4.942 on 8 and 1251 DF, p-value: 4.884e-06
# Todas las variables son significativas al 99% excepto ODA.ALL_diff y Regulatory Quality
GPD.PC = ODA.ALL + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[9]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2084.8 -611.6 -147.7 441.7 4237.9
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.461e+03 7.400e+01 33.256 < 2e-16 ***
## DT.ODA.ALLD.CD 4.006e-09 2.611e-08 0.153 0.878095
## CC.EST -9.011e+01 9.972e+01 -0.904 0.366385
## GE.EST 7.899e+02 1.042e+02 7.579 6.77e-14 ***
## PV.EST 1.556e+02 4.281e+01 3.634 0.000291 ***
## RQ.EST 9.097e+01 1.055e+02 0.863 0.388498
## RL.EST 1.399e+02 1.153e+02 1.214 0.225078
## VA.EST -2.908e+02 5.193e+01 -5.600 2.63e-08 ***
## SP.POP.GROW -2.049e+02 2.645e+01 -7.747 1.93e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 884.7 on 1251 degrees of freedom
## Multiple R-squared: 0.286, Adjusted R-squared: 0.2814
## F-statistic: 62.63 on 8 and 1251 DF, p-value: < 2.2e-16
# Todas las variables son significativas al 99% excepto ODA.ALL, Control of Corruption, Regulatory Quality y Rule of Law
GPD.PC = ODA.ALL + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[10]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2087.5 -613.1 -147.1 443.2 4235.6
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.463e+03 7.223e+01 34.100 < 2e-16 ***
## DT.ODA.ALLD.CD_diff -1.987e-08 4.833e-08 -0.411 0.681
## CC.EST -9.144e+01 9.951e+01 -0.919 0.358
## GE.EST 7.921e+02 1.037e+02 7.639 4.34e-14 ***
## PV.EST 1.526e+02 3.905e+01 3.907 9.83e-05 ***
## RQ.EST 8.941e+01 1.051e+02 0.851 0.395
## RL.EST 1.423e+02 1.139e+02 1.249 0.212
## VA.EST -2.910e+02 5.192e+01 -5.604 2.57e-08 ***
## SP.POP.GROW -2.040e+02 2.627e+01 -7.766 1.68e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 884.7 on 1251 degrees of freedom
## Multiple R-squared: 0.2861, Adjusted R-squared: 0.2815
## F-statistic: 62.66 on 8 and 1251 DF, p-value: < 2.2e-16
# Todas las variables son significativas al 99% excepto ODA.ALL_diff, Control of Corruption, Regulatory Quality y Rule of Law
GPD.PC = ODA.PC + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[11]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1876.5 -586.5 -166.4 364.0 4382.8
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2152.1327 76.8078 28.020 < 2e-16 ***
## DT.ODA.ODAT.PC.ZS 3.5326 0.3663 9.644 < 2e-16 ***
## CC.EST -314.1459 98.7580 -3.181 0.0015 **
## GE.EST 887.1625 100.5340 8.825 < 2e-16 ***
## PV.EST 91.4305 38.2095 2.393 0.0169 *
## RQ.EST 252.0015 102.7496 2.453 0.0143 *
## RL.EST 83.6278 110.0482 0.760 0.4474
## VA.EST -343.0970 50.3834 -6.810 1.51e-11 ***
## SP.POP.GROW -215.6641 25.3596 -8.504 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 853.6 on 1251 degrees of freedom
## Multiple R-squared: 0.3354, Adjusted R-squared: 0.3311
## F-statistic: 78.91 on 8 and 1251 DF, p-value: < 2.2e-16
# Todas las variables son significativas al 99% excepto Rule of Law
GPD.PC = ODA.PC_diff + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[12]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2086.8 -612.1 -149.5 443.9 4236.2
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2463.5620 72.2346 34.105 < 2e-16 ***
## DT.ODA.ODAT.PC.ZS_diff -0.1430 0.6699 -0.214 0.831
## CC.EST -90.9984 99.5154 -0.914 0.361
## GE.EST 791.8007 103.7015 7.635 4.45e-14 ***
## PV.EST 152.9173 39.0494 3.916 9.49e-05 ***
## RQ.EST 89.0682 105.0841 0.848 0.397
## RL.EST 142.6456 113.8873 1.253 0.211
## VA.EST -290.9756 51.9213 -5.604 2.57e-08 ***
## SP.POP.GROW -204.3284 26.2595 -7.781 1.50e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 884.7 on 1251 degrees of freedom
## Multiple R-squared: 0.286, Adjusted R-squared: 0.2814
## F-statistic: 62.63 on 8 and 1251 DF, p-value: < 2.2e-16
# Todas las variables son significativas al 99% excepto ODA.ALL_diff, Control of Corruption, Regulatory Quality y Rule of Law
GPD.PC_diff = ODA.ALL + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[13]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1846.43 -53.87 -5.80 54.02 979.92
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.163e+02 1.501e+01 7.747 1.93e-14 ***
## DT.ODA.ALLD.CD 3.885e-09 5.294e-09 0.734 0.463211
## CC.EST 4.553e+00 2.022e+01 0.225 0.821871
## GE.EST 7.093e+01 2.113e+01 3.356 0.000815 ***
## PV.EST 1.607e+01 8.681e+00 1.851 0.064380 .
## RQ.EST 1.272e+01 2.138e+01 0.595 0.551927
## RL.EST -5.141e+01 2.337e+01 -2.200 0.028019 *
## VA.EST -1.695e+01 1.053e+01 -1.610 0.107723
## SP.POP.GROW -1.311e+01 5.363e+00 -2.445 0.014625 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 179.4 on 1251 degrees of freedom
## Multiple R-squared: 0.03265, Adjusted R-squared: 0.02646
## F-statistic: 5.278 on 8 and 1251 DF, p-value: 1.592e-06
# Todas las variables son significativas al 99% excepto ODA.ALL, Control of Corruption, Regulatory Quality y Rule of Law
GPD.PC_diff = ODA.ALL + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[14]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1848.96 -54.18 -5.49 55.12 977.91
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.187e+02 1.465e+01 8.099 1.3e-15 ***
## DT.ODA.ALLD.CD_diff 8.408e-10 9.803e-09 0.086 0.931662
## CC.EST 3.620e+00 2.018e+01 0.179 0.857697
## GE.EST 7.247e+01 2.103e+01 3.446 0.000589 ***
## PV.EST 1.347e+01 7.921e+00 1.701 0.089255 .
## RQ.EST 1.136e+01 2.131e+01 0.533 0.593861
## RL.EST -4.875e+01 2.310e+01 -2.110 0.035018 *
## VA.EST -1.712e+01 1.053e+01 -1.626 0.104302
## SP.POP.GROW -1.266e+01 5.329e+00 -2.375 0.017683 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 179.4 on 1251 degrees of freedom
## Multiple R-squared: 0.03224, Adjusted R-squared: 0.02605
## F-statistic: 5.209 on 8 and 1251 DF, p-value: 2.002e-06
# Todas las variables son significativas al 99% excepto ODA.ALL_diff, Control of Corruption, Regulatory Quality y Rule of Law
GPD.PC_diff = ODA.PC + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[15]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1848.57 -53.50 -5.29 55.40 978.66
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 116.95754 16.14562 7.244 7.6e-13 ***
## DT.ODA.ODAT.PC.ZS 0.01913 0.07700 0.248 0.803845
## CC.EST 2.39691 20.75973 0.115 0.908099
## GE.EST 73.01261 21.13306 3.455 0.000569 ***
## PV.EST 13.12577 8.03194 1.634 0.102469
## RQ.EST 12.23781 21.59880 0.567 0.571090
## RL.EST -49.08248 23.13303 -2.122 0.034055 *
## VA.EST -17.39687 10.59101 -1.643 0.100716
## SP.POP.GROW -12.70204 5.33080 -2.383 0.017332 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 179.4 on 1251 degrees of freedom
## Multiple R-squared: 0.03228, Adjusted R-squared: 0.02609
## F-statistic: 5.216 on 8 and 1251 DF, p-value: 1.956e-06
# Todas las variables son significativas al 99% excepto Rule of Law
GPD.PC_diff = ODA.PC_diff + CC + GE + PV + RQ + RL + VA + POP.GROW
summary(models[[keys[16]]])
##
## Call:
## lm(formula = f, data = datos_model)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1849.13 -54.12 -5.43 55.49 978.21
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 118.62213 14.64785 8.098 1.31e-15 ***
## DT.ODA.ODAT.PC.ZS_diff 0.08439 0.13584 0.621 0.534542
## CC.EST 3.55436 20.17991 0.176 0.860218
## GE.EST 72.34043 21.02877 3.440 0.000601 ***
## PV.EST 13.43918 7.91850 1.697 0.089910 .
## RQ.EST 11.65185 21.30912 0.547 0.584613
## RL.EST -48.76680 23.09425 -2.112 0.034915 *
## VA.EST -17.13777 10.52869 -1.628 0.103836
## SP.POP.GROW -12.68555 5.32494 -2.382 0.017354 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 179.4 on 1251 degrees of freedom
## Multiple R-squared: 0.03253, Adjusted R-squared: 0.02635
## F-statistic: 5.258 on 8 and 1251 DF, p-value: 1.7e-06
# Todas las variables son significativas al 99% excepto ODA.ALL_diff, Control of Corruption, Regulatory Quality y Rule of Law
Se revisara las relaciones entre las variables graficamente
my_plot <- list()
for (col in c('DT.ODA.ALLD.CD', 'DT.ODA.ODAT.PC.ZS', 'DT.ODA.ALLD.CD_diff', 'DT.ODA.ODAT.PC.ZS_diff',
'CC.EST', 'GE.EST', 'PV.EST', 'RQ.EST', 'RL.EST', 'VA.EST')) {
my_plot[[col]] <- plot_ly(x = datos_model[[col]], y = datos_model[['hdi']], type = 'scatter', mode = 'markers', name = col)
}
subplot(my_plot[1:4], nrows = 2, margin = 0.05) %>% layout(title = 'HDI vs ODA')
subplot(my_plot[5:10], nrows = 2, margin = 0.05) %>% layout(title = 'HDI vs GOB')
my_plot <- list()
for (col in c('DT.ODA.ALLD.CD', 'DT.ODA.ODAT.PC.ZS', 'DT.ODA.ALLD.CD_diff', 'DT.ODA.ODAT.PC.ZS_diff',
'CC.EST', 'GE.EST', 'PV.EST', 'RQ.EST', 'RL.EST', 'VA.EST')) {
my_plot[[col]] <- plot_ly(x = datos_model[[col]], y = datos_model[['hdi_diff']], type = 'scatter', mode = 'markers', name = col)
}
subplot(my_plot[1:4], nrows = 2, margin = 0.05) %>% layout(title = 'HDI diff vs ODA')
subplot(my_plot[5:10], nrows = 2, margin = 0.05) %>% layout(title = 'HDI diff vs GOB')
my_plot <- list()
for (col in c('DT.ODA.ALLD.CD', 'DT.ODA.ODAT.PC.ZS', 'DT.ODA.ALLD.CD_diff', 'DT.ODA.ODAT.PC.ZS_diff',
'CC.EST', 'GE.EST', 'PV.EST', 'RQ.EST', 'RL.EST', 'VA.EST')) {
my_plot[[col]] <- plot_ly(x = datos_model[[col]], y = datos_model[['NY.GDP.PCAP.CD']],
type = 'scatter', mode = 'markers', name = col)
}
subplot(my_plot[1:4], nrows = 2, margin = 0.05) %>% layout(title = 'GDP.PC vs ODA')
subplot(my_plot[5:10], nrows = 2, margin = 0.05) %>% layout(title = 'GDP.PC vs GOB')
my_plot <- list()
for (col in c('DT.ODA.ALLD.CD', 'DT.ODA.ODAT.PC.ZS', 'DT.ODA.ALLD.CD_diff', 'DT.ODA.ODAT.PC.ZS_diff',
'CC.EST', 'GE.EST', 'PV.EST', 'RQ.EST', 'RL.EST', 'VA.EST')) {
my_plot[[col]] <- plot_ly(x = datos_model[[col]], y = datos_model[['NY.GDP.PCAP.CD_diff']], type = 'scatter', mode = 'markers', name = col)
}
subplot(my_plot[1:4], nrows = 2, margin = 0.05) %>% layout(title = 'GDP.PC diff vs ODA')
subplot(my_plot[5:10], nrows = 2, margin = 0.05) %>% layout(title = 'GDP.PC diff vs GOB')
No se ve una relacion clara, hay tanto paises con punteos altos y bajos de GOB que tienen tanto HID altos o bajos Quiza puede verse una leve relacion de mayor punteo en GOB acompañado de mejor punteo den HDI Los datos de GPD si muestran una relacion positiva con el HDI visto en las graficas
Se realizara el mismo proceso con el crecimiento o decrecimiento de HDI anual
Viendo la historia de las variables en el tiempo (por pais)
datos_model %>% filter(iso2c == 'AF') %>% plot_ly(x = ~year) %>%
add_trace(y = ~hdi, type = 'scatter', mode = 'lines+markers', name = 'hdi') %>%
add_trace(y = ~NY.GDP.PCAP.CD / 1000, type = 'scatter', mode = 'lines+markers', name = 'gdp.pc') %>%
add_trace(y = ~DT.ODA.ALLD.CD / 10000000000, type = 'scatter', mode = 'lines+markers', name = 'ODA.ALL') %>%
add_trace(y = ~DT.ODA.ODAT.PC.ZS / 1000, type = 'scatter', mode = 'lines+markers', name = 'ODA.PC') %>%
add_trace(y = ~CC.EST, type = 'scatter', mode = 'lines+markers', name = 'CC') %>%
add_trace(y = ~GE.EST, type = 'scatter', mode = 'lines+markers', name = 'GE') %>%
add_trace(y = ~PV.EST, type = 'scatter', mode = 'lines+markers', name = 'PV') %>%
add_trace(y = ~RQ.EST, type = 'scatter', mode = 'lines+markers', name = 'RQ') %>%
add_trace(y = ~RL.EST, type = 'scatter', mode = 'lines+markers', name = 'RL') %>%
add_trace(y = ~VA.EST, type = 'scatter', mode = 'lines+markers', name = 'VA')
plm(hdi ~ DT.ODA.ALLD.CD + CC.EST + GE.EST + PV.EST + RQ.EST + RL.EST + VA.EST + SP.POP.GROW, data=datos_model,
index = c("iso2c", "year"), model = "within")
##
## Model Formula: hdi ~ DT.ODA.ALLD.CD + CC.EST + GE.EST + PV.EST + RQ.EST + RL.EST +
## VA.EST + SP.POP.GROW
##
## Coefficients:
## DT.ODA.ALLD.CD CC.EST GE.EST PV.EST RQ.EST
## 2.0890e-11 -8.3315e-03 7.5391e-03 -4.4617e-03 2.0938e-02
## RL.EST VA.EST SP.POP.GROW
## 3.2560e-02 6.9264e-03 -5.5903e-03
# summary(lm(hdi ~ DT.ODA.ALLD.CD + CC.EST + GE.EST + PV.EST + RQ.EST + RL.EST + VA.EST + SP.POP.GROW + iso2c, data=datos_model))
# Corruption Control, Government Effectiveness, Political Stability y Voice and Accountability no son significativas
plm(hdi ~ DT.ODA.ODAT.PC.ZS + CC.EST + GE.EST + PV.EST + RQ.EST + RL.EST + VA.EST + SP.POP.GROW, data=datos_model,
index = c("iso2c", "year"), model = "within")
##
## Model Formula: hdi ~ DT.ODA.ODAT.PC.ZS + CC.EST + GE.EST + PV.EST + RQ.EST +
## RL.EST + VA.EST + SP.POP.GROW
##
## Coefficients:
## DT.ODA.ODAT.PC.ZS CC.EST GE.EST PV.EST
## 0.0001890 -0.0090492 -0.0012169 -0.0066846
## RQ.EST RL.EST VA.EST SP.POP.GROW
## 0.0225845 0.0433849 0.0048044 -0.0089386
#summary(lm(hdi ~ DT.ODA.ODAT.PC.ZS + CC.EST + GE.EST + PV.EST + RQ.EST + RL.EST + VA.EST + SP.POP.GROW + iso2c, data=datos_model))
# Corruption Control, Government Effectiveness y Voice and Accountability no son significativas
plm(NY.GDP.PCAP.CD ~ DT.ODA.ALLD.CD + CC.EST + GE.EST + PV.EST + RQ.EST + RL.EST + VA.EST + SP.POP.GROW, data=datos_model,
index = c("iso2c", "year"), model = "within")
##
## Model Formula: NY.GDP.PCAP.CD ~ DT.ODA.ALLD.CD + CC.EST + GE.EST + PV.EST +
## RQ.EST + RL.EST + VA.EST + SP.POP.GROW
##
## Coefficients:
## DT.ODA.ALLD.CD CC.EST GE.EST PV.EST RQ.EST
## 2.6336e-07 -2.1804e+01 4.6280e+02 1.9040e+02 -5.2602e+01
## RL.EST VA.EST SP.POP.GROW
## -1.6883e+02 -2.6173e+01 -3.7759e+01
#summary(lm(NY.GDP.PCAP.CD ~ DT.ODA.ALLD.CD + CC.EST + GE.EST + PV.EST + RQ.EST + RL.EST + VA.EST + SP.POP.GROW + iso2c, data=datos_model))
# Intercepto, Corruption Control, Regulatory Quality, Rule of Law, Voice and Accountability y Population Growth no son significativas
plm(NY.GDP.PCAP.CD ~ DT.ODA.ODAT.PC.ZS + CC.EST + GE.EST + PV.EST + RQ.EST + RL.EST + VA.EST + SP.POP.GROW, data=datos_model,
index = c("iso2c", "year"), model = "within")
##
## Model Formula: NY.GDP.PCAP.CD ~ DT.ODA.ODAT.PC.ZS + CC.EST + GE.EST + PV.EST +
## RQ.EST + RL.EST + VA.EST + SP.POP.GROW
##
## Coefficients:
## DT.ODA.ODAT.PC.ZS CC.EST GE.EST PV.EST
## 3.6490 -82.8703 370.2174 156.9927
## RQ.EST RL.EST VA.EST SP.POP.GROW
## -13.5138 -2.0353 -66.6104 -85.1696
#summary(lm(NY.GDP.PCAP.CD ~ DT.ODA.ODAT.PC.ZS + CC.EST + GE.EST + PV.EST + RQ.EST + RL.EST + VA.EST + SP.POP.GROW + iso2c, data=datos_model))
# Corruption Control, Regulatory Quality, Rule of Law y Voice and Accountability no son significativas